const bcrypt = require('bcryptjs');

function jiami(pass){

    const password = pass;
    const salt = bcrypt.genSaltSync(10);
    return bcrypt.hashSync(password, salt);


}
function jiemi(pass,oldpass){
   return bcrypt.compareSync(pass, oldpass);
}
exports.jiami=jiami
exports.jiemi=jiemi